package cn.edu.sjtu.dfa;

public class CallWithReturn extends Instruction {
	private Move m;
	private Call c;
	
	public CallWithReturn(RegisterList rl, Register inner, Register callee, String func, Register outer) {
		c = new Call(rl, inner, callee, func);
		m = new Move(outer, inner);
	}
	
	public Call getFunctionCall() {
		return c;
	}
	
	public Move getMoveFunction() {
		return m;
	}

	@Override
	public String toString() {
		return c.toString() + " return to v" + ((Register)m.getEnd()).getRegister();
	}
}
